package com.snowj.apaas.service;

import com.snowj.apaas.domain.auto.Agreements;
import com.snowj.apaas.web.vm.AgreementsVm;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.text.ParseException;
import java.util.Date;
import java.util.Optional;

public interface AgreementService {


    /**
     * 列出合同列表
     * 签约日期，客户名称，项目内容，商务人员，工程师，进度
     * @param pageable
     * @return
     */
    Page<AgreementsVm> listAgreements(String startDate, String endDate, String clientName, String projectInfo,
                                      String businessPeople, String engineer, Integer process, Pageable pageable) ;
    /**
     * 根据编号查询合同
     * @param id 合同编号
     * @return
     */
    Optional<Agreements> findAgreementsById(Long id);

    /**
     * 创建合同
     * @param agreements 合同信息
     * @return
     */
    Agreements createAgreements(Agreements agreements);

    /**
     * 更新合同
     * @param agreements 合同信息
     * @return
     */
    Agreements updateAgreements(Agreements agreements);

    /**
     * 删除合同
     * @param id 合同编号
     */
    void deleteAgreements(Long id);
}
